package com.eckey.lab.feign;

import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author: Marinc
 * @CreateTime: 2023-07-27  14:40
 * @Description: TODO
 * @Version: 1.0
 */
@Slf4j
public class UserClientFallbackFactory implements FallbackFactory<UserFeign> {
    public UserFeign create(Throwable throwable) {
        return new UserFeign() {
            public String getUserById() {
                return "查询失败，用户不存在";
            }
        };
    }
}
